import request from '@/utils/request'
let lawServicePlatform = "lawServicePlatform";

// 分页显示知识产权
export function getIntellectualPropertyByPage(data) {
  return request({
    url: lawServicePlatform + "/intellectualProperty/getIntellectualPropertyByPage?pageNum="+data.pageNum+"&pagesize="+data.pagesize,
    method: 'post',
    data
  })
}

// 模糊查询知识产权
export function getIntellectualPropertyByName(data) {
  return request({
    url: "/lawServicePlatform/intellectualProperty/getIntellectualPropertyByName?name=" + data.name,
    method: 'get',
  })
}

// 根据id进入详情页
export function getIntellectualPropertyDetail(id) {
  return request({
    url: "/lawServicePlatform/intellectualProperty/getIntellectualPropertyDetail?id=" + id,
    method: 'get',
  })
}

// 根据采买方id和知识产权实体类进行购买
export function BuyIntellectualProperty(id,data) {
  return request({
    url: "/lawServicePlatform/intellectualProperty/BuyIntellectualProperty?id=" + id,
    method: 'post',
    data
  })
}


//分页显示已上架的知识产权
export function SelectONIntellectualProperty(pageObj) {
  return request({
    url: "/lawServicePlatform/intellectualProperty/SelectONIntellectualProperty?pageNum="+pageObj.pageNum+"&pagesize="+pageObj.pagesize,
    method: 'get',
  })
}


// 通过名称查看已上架知识产权
export function getIntellectualPropertyOnByName(name, pageNum, pagesize) {
  return request({
    url: "/lawServicePlatform/intellectualProperty/getIntellectualPropertyOnByName?name="+name+"&pageNum="+pageNum+"&pageSize="+pagesize,
    method: 'get',
  })
}